package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessOrgRelationRelMapper;
import com.ruoyi.business.domain.BusinessOrgRelationRel;
import com.ruoyi.business.service.IBusinessOrgRelationRelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 教师关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-30
 */
@Service
public class BusinessOrgRelationRelServiceImpl implements IBusinessOrgRelationRelService 
{
    @Autowired
    private BusinessOrgRelationRelMapper businessOrgRelationRelMapper;

    /**
     * 查询教师关系
     * 
     * @param relId 教师关系主键
     * @return 教师关系
     */
    @Override
    public BusinessOrgRelationRel selectBusinessOrgRelationRelByRelId(Long relId)
    {
        return businessOrgRelationRelMapper.selectBusinessOrgRelationRelByRelId(relId);
    }

    /**
     * 查询教师关系列表
     * 
     * @param businessOrgRelationRel 教师关系
     * @return 教师关系
     */
    @Override
    public List<BusinessOrgRelationRel> selectBusinessOrgRelationRelList(BusinessOrgRelationRel businessOrgRelationRel)
    {
        return businessOrgRelationRelMapper.selectBusinessOrgRelationRelList(businessOrgRelationRel);
    }

    /**
     * 新增教师关系
     * 
     * @param businessOrgRelationRel 教师关系
     * @return 结果
     */
    @Override
    public int insertBusinessOrgRelationRel(BusinessOrgRelationRel businessOrgRelationRel)
    {
        return businessOrgRelationRelMapper.insertBusinessOrgRelationRel(businessOrgRelationRel);
    }

    /**
     * 修改教师关系
     * 
     * @param businessOrgRelationRel 教师关系
     * @return 结果
     */
    @Override
    public int updateBusinessOrgRelationRel(BusinessOrgRelationRel businessOrgRelationRel)
    {
        return businessOrgRelationRelMapper.updateBusinessOrgRelationRel(businessOrgRelationRel);
    }

    /**
     * 批量删除教师关系
     * 
     * @param relIds 需要删除的教师关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessOrgRelationRelByRelIds(String relIds)
    {
        return businessOrgRelationRelMapper.deleteBusinessOrgRelationRelByRelIds(Convert.toStrArray(relIds));
    }

    /**
     * 删除教师关系信息
     * 
     * @param relId 教师关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessOrgRelationRelByRelId(Long relId)
    {
        return businessOrgRelationRelMapper.deleteBusinessOrgRelationRelByRelId(relId);
    }

    @Override
    public void deleteBusinessOrgRelationRelByTeacherIdAndOrgId(List<String> teacherIds, String orgId) {
        businessOrgRelationRelMapper.deleteBusinessOrgRelationRelByTeacherIdAndOrgId(teacherIds, orgId);
    }
}
